/*
 *   Copyright (C) 2009 Ultratronik Entwicklungs GmbH 
 *
 *     - Author: Sören Wellhöfer <soeren.wellhoefer@gmx.net>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 */

#include "maeplay.hpp"

#include <QApplication>
#include <QBrush>
#include <QColor>
#include <QWSServer>

#define PROGRAM "maeplay"
#define VERSION "0.1"

static const char *usg =
	PROGRAM " " VERSION " - Qt front-end for maiplayer\n"
	"usage: " PROGRAM " <file> [-qws]\n";

int main(int argc, char **argv)
{
	QWSServer::setBackground(QBrush(QColor(0, 0, 0)));
	QWSServer::setCursorVisible(false);
	
	if(argc < 2) {
		std::cout << usg << std::endl;
		exit(-1);
	}

	QApplication app(argc, argv);
	PlayerUI player_ui;
	
	player_ui.show();

	// TODO: Codec auto-discovery; so far only MPEG4_VID
	player_ui.open(Player::MPEG4_VID, argv[1]);
	
	return app.exec();

	return 0;
}
